<?php

class ActionStatistics extends BaseAction
{
    public function run()
    {
        $this->template->aAvgRateSale = Lot::model()->getAvgRate('sale');
        $this->template->aAvgRatePurchase = Lot::model()->getAvgRate('purchase');
        $this->template->aAvgRateSaleYesterday = Lot::model()->getAvgRateYesterday('sale');
        $this->template->aAvgRatePurchaseYesterday = Lot::model()->getAvgRateYesterday('purchase');

        $this->template->aSumCurrencySale = Lot::model()->getCurrencySum('sale');
        $this->template->aSumCurrencyPurchase = Lot::model()->getCurrencySum('purchase');
        $this->template->aSumCurrencySaleYesterday = Lot::model()->getCurrencySumYesterday('sale');
        $this->template->aSumCurrencyPurchaseYesterday = Lot::model()->getCurrencySumYesterday('purchase');


    }
}